import { domainService } from "~/config/server";
import { NetService } from "~/utils/net.service";
import { Inject, Debounce } from "~/core/decorator";
import { Service } from "~/core/service";

export class CaseLegalRecordService extends Service {
  @Inject(NetService)
  private netService: NetService;

  /**
   * 新增诉讼记录
   * @param data
   */
  public addCaseLegalRecord(data) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.addCaseLegalRecord,
      data,
    });
  }
  /**
   * 修改诉讼记录
   * @param data
   */
  public editCaseLegalRecord(data) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.editCaseLegalRecord,
      data,
    });
  }
  /**
   * 分页查询诉讼记录
   * @param data
   */
  public getCaseLegalRecord(data, page, sort) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.getCaseLegalRecord,
      data,
      page,
      sort,
    });
  }
  /**
   * 查看诉讼详情
   * @param data
   */
  public getCaseLegalRecordById(data) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.getCaseLegalRecordById,
      data
      // data: {
      //   id: data
      // }
    });
  }
  /**
   * 查看诉讼附件详情(文件列表)
   * @param data
   */
   public getCaseLegalRecordFileById(data) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.getCaseLegalRecordFileById,
      data,
    });
   }

   public getCaseLegalRecordFileByCaseId(data,page) {
    return this.netService.send({
      server: domainService.caseLegalRecordController.getCaseLegalRecordFileByCaseId,
      data,
      page
    });
   }

  /**
   * 查看诉讼附件详情(文件列表)
   * @param data
   */
    public caseLegalRecordFile(data) {
      return this.netService.send({
        server: domainService.caseLegalRecordController.caseLegalRecordFile,
        data,
      });
     }
}
